<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <!--[if IE]>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <![endif]-->
    <title>Free Responsive Admin Theme - ZONTAL</title>
    <meta content="易工场" name="keywords">
    <meta content="易工场" name="description">
    <meta http-equiv="Cache-Control" content="max-age=180">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="x-dns-prefetch-control" content="on">
    <!-- BOOTSTRAP CORE STYLE  -->
    <link href="assets/css/bootstrap.css" rel="stylesheet" />
    <!-- FONT AWESOME ICONS  -->
    <link href="assets/css/font-awesome.css" rel="stylesheet" />
    <!-- CUSTOM STYLE  -->
    <link href="assets/css/style.css" rel="stylesheet" />
    <!-- HTML5 Shiv and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <link href="font/iconfont.css" rel="stylesheet" type="text/css" />
    <link href="css/basestyle.css" rel="stylesheet" type="text/css" />
    <link href="css/common.css" rel="stylesheet" type="text/css" />
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="js/modernizr.js"></script>
    <script type="text/javascript" src="js/common.js"></script>
    <script type="text/javascript" src="js/swiper.min.js"></script>
    <script type="text/javascript" src="assets/js/bootstrap.js"></script>
    <![endif]-->
</head>
<body>
<header>
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <strong>Email: </strong>info@yourdomain.com
                &nbsp;&nbsp;
                <strong>Support: </strong>+90-897-678-44
            </div>

        </div>
    </div>
</header>
<!-- HEADER END-->
<div class="navbar navbar-inverse set-radius-zero">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="index.html">

                <img src="assets/img/logo.png" />
            </a>

        </div>

        <div class="left-div">
            <div class="user-settings-wrapper">
                <ul class="nav">

                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
                            <span class="glyphicon glyphicon-user" style="font-size: 25px;"></span>
                        </a>
                        <div class="dropdown-menu dropdown-settings">
                            <div class="media">
                                <a class="media-left" href="#">
                                    <img src="assets/img/64-64.jpg" alt="" class="img-rounded" />
                                </a>
                                <div class="media-body">
                                    <h4 class="media-heading">Jhon Deo Alex </h4>
                                    <h5>Developer & Designer</h5>

                                </div>
                            </div>
                            <hr />
                            <h5><strong>Personal Bio : </strong></h5>
                            Anim pariatur cliche reprehen derit.
                            <hr />
                            <a href="#" class="btn btn-info btn-sm">Full Profile</a>&nbsp; <a href="login.html" class="btn btn-danger btn-sm">Logout</a>

                        </div>
                    </li>


                </ul>
            </div>
        </div>
    </div>
</div>
<!-- LOGO HEADER END-->
<section class="menu-section">
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="navbar-collapse collapse ">
                    <ul id="menu-top" class="nav navbar-nav navbar-right">
                        <li><a class="menu-top-active" href="index.html">Dashboard</a></li>
                        <li><a href="ui.html">UI Elements</a></li>
                        <li><a href="table.html">Data Tables</a></li>
                        <li><a href="forms.html">Forms</a></li>
                        <li><a href="login.html">Login Page</a></li>
                        <li><a href="blank.html">Blank Page</a></li>

                    </ul>
                </div>
            </div>

        </div>
    </div>
</section>
<!-- MENU SECTION END-->
<div class="wx-top">
    <div class="top-title">优惠券</div>
</div>
<div class="top-blank"></div>
<div class="wx-containe">
    <table id="table"></table>
    <div class="tabbox tit_3" id="yhqtab">
        <div class="tab-tit"> <a href="javascript:;" class="active" onclick="tabs('#yhqtab',0)">未使用</a> <a href="javascript:;" class="" onclick="tabs('#yhqtab',1)">已使用</a> <a href="javascript:;" class="" onclick="tabs('#yhqtab',2)">已过期</a></div>
        <div class="tab-con">
            <ul class="yhqbox" id="a1">

            </ul>
        </div>
        <div class="tab-con" style="display:none">
            <ul class="yhqbox" id="a2">

            </ul>
        </div>
        <div class="tab-con" style="display:none">
            <ul class="yhqbox" id="a3">

            </ul>
        </div>
    </div>
</div>
<div class="ft-blank"></div>
<div class="wx-footer"> <a href="javascript:;" class="fb-btn">去付款</a> </div>


<!-- CONTENT-WRAPPER SECTION END-->
<footer>
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                &copy; 2015 YourCompany | By : <a href="http://www.designbootstrap.com/" target="_blank">DesignBootstrap</a>
            </div>

        </div>
    </div>
</footer>
<!-- FOOTER SECTION END-->
<!-- JAVASCRIPT AT THE BOTTOM TO REDUCE THE LOADING TIME  -->
<!-- CORE JQUERY SCRIPTS -->
<script src="assets/js/jquery-1.11.1.js"></script>
<!-- BOOTSTRAP SCRIPTS  -->
<script src="assets/js/bootstrap.js"></script>
<script type="text/javascript">

    $(function (){
        $.ajax
        ({
            dataType: "json",
            url: "http://localhost:8088/coupon/queryUserCoupon", //这里是网址
            xhrFields: { withCredentials: true },
            crossDomain:true,
            success:function(data){
                var ua = ""
                var ub = ""
                var uc = ""
                for ( var i = 0; i < data.length; i++) {
                    if (data[i].couponStatus==1){
                        ua +=  '<li>'+
                            ' <div class="stamp stamp04" >'+
                            '<div class="par">\n' +
                            '<p>xxxx</p>\n' +
                            '<sub class="sign">￥</sub><span>50.00</span><sub>还剩22张</sub>\n' +
                            '<p>订单满100.00元</p>\n' +
                            '</div>\n' +
                            '<div class="copy">未使用\n' +
                            '<p>2015-08-13<br>\n' +
                            '2016-08-13</p>\n' +
                            '<a href="#">立即使用</a></div>\n' +
                            '<i></i> </div>\n' +
                            '</li>'
                    }if (data[i].couponStatus==2){
                        ub +=  '<li>\n' +
                            '<div class="stamp stamp02">\n' +
                            '<div class="par">\n' +
                            '<p>满减券</p>\n' +
                            '<sub class="sign">￥</sub><span>50.00</span><sub>全品类</sub>\n' +
                            '<p>订单满100.00元</p>\n' +
                            '</div>\n' +
                            '<div class="copy">已使用\n' +
                            '<p>2015-08-13<br>\n' +
                            '2016-08-13</p>\n' +
                            '</div>\n' +
                            '<i></i> </div>\n' +
                            '</li>\n'

                    }if (data[i].couponStatus==3){
                        uc +=  '<li>\n' +
                            '<div class="stamp stamp03">\n' +
                            ' <div class="par">\n' +
                            '<p>满减卷</p>\n' +
                            '<sub class="sign">￥</sub><span>50.00</span><sub>全品类</sub>\n' +
                            '<p>订单满100.00元</p>\n' +
                            '</div>\n' +
                            '<div class="copy">已过期\n' +
                            '<p>2015-08-13<br>\n' +
                            '2016-08-13</p>\n' +
                            '</div>\n' +
                            '<i></i> </div>\n' +
                            '</li>'
                    }

                }

                $("#a1").html(ua)
                $("#a2").html(ub)
                $("#a3").html(uc)
            },
            timeout:30000,

        });

    })
</script>
</body>
</html>
